@namespace SwashbucklerDiary.Rcl.Components
@inherits DialogComponentBase

<CustomMDialog MyValue="Visible"
               MyValueChanged="InternalVisibleChanged"
               ContentClass="rounded-lg"
               Eager="false"
               MaxWidth="420">
    <MCard>
        <MCardTitle Class="font-weight-bold flex-nowrap">
            <wc-auto-scroll-text>@(I18n.T("Check for updates"))</wc-auto-scroll-text>
            <MSpacer></MSpacer>
            <MButton Icon="true"
                     OnClick="HandleOnCancel">
                <MIcon>close</MIcon>
            </MButton>
        </MCardTitle>
        <MCardText Class="pb-0">
            <div class="text-subtitle-1">@(I18n.T("Latest version detected, do you go to update? (If no new version is found, it may be under review)"))</div>
            <MCheckbox @bind-Value="notPrompt"
                       TValue="bool"
                       Dense="true"
                       HideDetails="@("auto")"
                       OnChange="ChangeUpdateNotPrompt">
                <LabelContent>
                    <div class="text-subtitle-2">
                        @(I18n.T("No more prompts next time"))
                    </div>
                </LabelContent>
            </MCheckbox>
        </MCardText>
        <MCardActions>
            <MSpacer></MSpacer>
            <MButton Text="true"
                     OnClick="HandleOnCancel">
                @(I18n.T("Cancel"))
            </MButton>
            <MButton Text="true"
                     Color="primary"
                     OnClick="ToUpdate">
                @(I18n.T("OK"))
            </MButton>
        </MCardActions>
    </MCard>
</CustomMDialog>